<template>
  <div class="answers_nav_list">
    <ul class="bubble_nav_list">
        <li v-for="navListItem in answersData.data" :key="navListItem.id" @click="handleNavList(navListItem.naviName)">
            <img :src="navListItem.naviImg" alt="">
            <span>{{ navListItem.naviName }}</span>
        </li>
    </ul>
  </div>
</template>

<script>
import getTime from '@/utils/getTime.js'
import { setTalkAnswers,setCustomBubble,setFootPrint } from '@/utils/setChatStoreData.js'
export default {
    name: 'AnswersNavList',
    props: ['robotInfo','answersData'],
    methods: {
        // 快捷导航点击事件
        handleNavList(naviName){
            switch(naviName){
                case '快捷导航':
                    setCustomBubble(this,this.$store.state.categoryListData);
                    break;
                case '我的收藏':
                    setTalkAnswers(this, "我的收藏");
                    break;
                case '我的足迹':
                    setFootPrint(this,'我的足迹',getTime());
                    break;
            }
        }
    }
}
</script>
